var ioc = {
    // 读取配置文件
    conf: {
        type: "org.nutz.ioc.impl.PropertiesProxy",
        fields: {
            paths: ["conf/"]
        }
    },
    dataSource: {
        factory: "$conf#make",
        args: ["com.alibaba.druid.pool.DruidDataSource", "db."],
        type: "com.alibaba.druid.pool.DruidDataSource",
        events: {
            create: "init",
            depose: 'close'
        }
    },
    dao: {
        type: "org.nutz.dao.impl.NutDao",
        args: [{refer: "dataSource"}],
        fields: {
            interceptors: [{refer: "cacheExecutor"}, "log"]
        }
    },
    cacheExecutor: {
        type: "org.nutz.plugins.cache.dao.DaoCacheInterceptor",
        fields: {
            cacheProvider: {refer: "cacheProvider"},
            // 需要缓存的表名
            cachedTableNames: ["sys_user", "sys_role", "sys_permission", "sys_role_permission", "sys_user_role","post_info","post_area_info", "post_link_info", "post_nature_info", "post_shift_arrangement", "post_sign_info","post_type_info"
            ]
        }
    },
    // 基于Ehcache的DaoCacheProvider
    cacheProvider: {
        type: "org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider",
        fields: {
            cacheManager: {refer: "cacheManager"} // 引用ehcache.js中定义的CacheManager
        },
        events: {
            create: "init"
        }
    }
};